import 'package:sharing/resources/colors.dart';
import 'package:flutter/material.dart';
class BottomPubButton extends StatelessWidget {
 final  VoidCallback onPress;
 final left;
 final width;


 BottomPubButton({@required this.onPress,@required this.left, @required this.width});



 @override
  Widget build(BuildContext context) {
    return  Positioned(
      bottom: 8.0,
      left: left,
      height: 48,
      child: Center(
        child: Container(
          width: width,
          margin: const EdgeInsets.only(bottom: 8.0),
          //  padding: const EdgeInsets.symmetric(vertical: 8.0,horizontal: 4.0),
          decoration: BoxDecoration(
              color: AppColor.orange,
              border: Border.all(
                color: Colors.transparent,
              ),
              borderRadius: BorderRadius.circular(24.0)
          ),
          alignment: Alignment.bottomCenter,
          child: FlatButton.icon(
            icon: Icon(
              Icons.add,
              color: Colors.white,
            ),
            label: Text(
              "发布",
              style: TextStyle(fontSize: 16.0, color: Colors.white),
            ),
            onPressed: onPress,
          ),
        ),
      ),
    );
  }
}
